<?php

// This file is part of the Carrington Text Theme for WordPress
// http://carringtontheme.com
//
// Copyright (c) 2008-2009 Crowd Favorite, Ltd. All rights reserved.
// http://crowdfavorite.com
//
// Released under the GPL license
// http://www.opensource.org/licenses/gpl-license.php
//
// **********************************************************************
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
// **********************************************************************

if (__FILE__ == $_SERVER['SCRIPT_FILENAME']) { die(); }
if (CFCT_DEBUG) { cfct_banner(__FILE__); }

global $previousday, $authordata;
$previousday = -1;

$photos = aldenta_get_images('full');

$uagent_obj = new uagent_info();

//*** detect mobile **//
$isMobile = $uagent_obj->DetectSmartphone();

if($isMobile == 0)
{
?>
	<article class='aircraft-sub'>
		
		<div class='arrows'>
			<div class='arrow-right'></div>
			<div class='arrow-left'></div>
		</div>
		
		<dl id="slider-<?php the_ID() ?>" class='slider'>
		<?php 

		if ($photos) 
		{
			foreach ($photos as $photo) 
			{
				echo "<dd>$photo</dd>";
			}
		}

		?>

		</dl>
		
		<img class='light' src="<? bloginfo('template_url');?>/img/light-big.png">
		
		<div class='caption'><?php the_content();?></div>
		
		
		<div class="by-line">
			<?php edit_post_link(__('Edit', 'carrington-text'), '<div class="entry-editlink">', '</div>'); ?>
		</div><!--/by-line-->
	
	</article><!--/aircraft sub-->
	
	<ul class='links-bar'>
		<li><a href='/wp-content/uploads/SSJ100_ProductBrochure_2011.pdf.zip' class='brochure'>Download Sukhoi Business Jet Product Brochure ></a></li>
	</ul>
	
<?php
}else{
	/* smart phone version*/
	?>
	<article class='aircraft-sub'>
		
		<?php if ($photos) 
		{
		?>
		<div class='smartPhoneImg'><a href='<?php echo get_permalink(); ?>'><?php echo($photos[0]); ?></a></div>
		<?php } ?>
		<div class='caption'>
			
			<h2><?php the_title();?></h2>
			
			<? the_content();?>

			
		</div>
		<a href='<?php echo get_permalink(); ?>'class='tap'>TAP FOR MORE</a>
		
	</article>
	<?php
}
?>
